package d3_interface_demo;

import java.util.ArrayList;

public class ClassManager {
    private ArrayList<Student> students = new ArrayList<>();
//    private StudentOperator studentOperator = new StudentOperatorImpl1();
    private StudentOperator studentOperator = new StudentOperatorImpl2();

    public ClassManager(){
        Student s1 = new Student("a", '女', 99);
        Student s2 = new Student("b", '女', 93);
        Student s3 = new Student("c", '男', 90);
        Student s4 = new Student("d", '男', 92);
        students.add(s1);
        students.add(s2);
        students.add(s3);
        students.add(s4);
    }

    public void printInfo(){
        studentOperator.printAllInfo(students);
    }

    public void printScore(){
        studentOperator.printAverageScore(students);
    }
}
